#!/usr/bin/env python
# -*- coding: utf-8 -*-

from django import template

register = template.Library()


@register.filter()
def multiplication(num1, num2):
    req = num1 * num2
    return req


@register.filter
def subtraction(num1, num2):
    req = num1 - num2
    return req


@register.filter
def division(num1, num2):
    req = num1 / num2
    return req


@register.filter
def show_a(url, title):
    req_url = '<a href="http://{}">{}</a>'.format(url, title)
    return req_url
